package com.supermap.dataservice.project.cq.agri;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author aqua
 * @description
 * @date 2018年11月12 下午 4:59
 * @email 1301584033@qq.com
 */
@Mapper
public interface AgriProductMapper {

    /**
     * 首页农技
     * */
    @Select("select t1.id as productId,t1.product_name as productName, date_format(t1.make_date,'%Y-%m-%d %H:%i:%S') as createTime ,t1.product_mainpic as image,t1.folder_name as folderName from t_b_pms_product t1\n" +
            "inner join t_b_productgroup t2 on t1.product_group = t2.id  \n" +
            "inner join t_s_depart t3 on t2.sys_org_code = t3.org_code\n" +
            "and t2.content_category=#{baseId}\n" +
            "  and t3.depareacode like  concat(#{areaCode},'%') "+
            "order by  t1.create_date desc limit 0,#{pageSize}")
    List<Map<String,Object>> getAgriProductTimeDesc(@Param("baseId")String baseId,@Param("areaCode")String areaCode,@Param("pageSize")int pageSize);

    /**
     *
     * */




}
